﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CourseUtils;

namespace MaxOfThree
{
    class Program
    {
        static int findingMaxNumber()
        {
            int max = 0;
            int[] numbers = new int[3];
            for (int i = 0; i < 3; i++)
            {
                numbers[i] = IOHelpers.ReadIntFromConsole("Enter number");
            }
            foreach (int a in numbers)
            {
                if (a > max)
                {
                    max = a;
                }
            }
            return max;

        }
        static void Main(string[] args)
        {
            int maxNumber = findingMaxNumber();
            Console.WriteLine("Max value equals {0}", maxNumber);
            Console.ReadKey();
        }
    }
}
